package com.waitingresult.designpattern.behavioral.strategy.enums;

import lombok.Getter;

/**
 * All right reserved,Designed By WangShuai
 *
 * @author : WangShuai
 * @version : V1.0
 * @ClassName : StrategyEnum02
 * @Description :
 * @date : 2022/9/15 21:38
 */
@Getter
public enum StrategyEnum03 {
    One("One",StrategyOne.class),
    Tow("Tow", StrategyTow.class);
    private String name;
    private Class bizStrategy;

    StrategyEnum03(String name, Class bizStrategy) {
        this.name = name;
        this.bizStrategy = bizStrategy;
    }

    public static StrategyEnum03 getEnum(String name) {
        for (StrategyEnum03 value : StrategyEnum03.values()) {
            if (value.getName().equals(name)) {
                return value;
            }
        }
        return null;
    }

}
